package com.dt.dubai.mber.entity;

import com.dt.dubai.core.comm.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.*;

import javax.persistence.Table;
import javax.validation.constraints.*;


/*
 * 顾客购物车表
 */

@Data
@Table(name = "dt_mber_customer_cart")
@EqualsAndHashCode(callSuper = false)
public class MberCustomerCartEntity extends BaseEntity {

    //顾客登录记录ID
    @NotNull(message = "customerRecordId参数不能为空")
    Long customerRecordId;

    //商户记录ID
    @NotNull(message = "merchantRecordId参数不能为空")
    Long merchantRecordId;

    //商品编码
    @NotNull(message = "commodityCode参数不能为空")
    Long commodityCode;

    //sku记录ID
    @NotNull(message = "skuRecordId参数不能为空")
    Long skuRecordId;

    //商品图
    @Length(min = 0, max = 60, message = "commodityPicUrl参数最大长度不60")
    String commodityPicUrl;

    //商品名称
    @Length(min = 0, max = 250, message = "commodityName参数最大长度不250")
    String commodityName;

    //商品子名称
    @Length(min = 0, max = 250, message = "commodityNameSub参数最大长度不250")
    String commodityNameSub;

    //商品描述
    @Length(min = 0, max = 250, message = "commodityDescribe参数最大长度不250")
    String commodityDescribe;

    //数量
    Integer num;

    //商品单价
    Integer commodityPrice;

    //活动单价
    Integer commodityActivityPrice;

    //活动优惠属性
    @Length(min = 0, max = 100, message = "commodityActivity参数最大长度不100")
    String commodityActivity;


}
